package cn.hengzhu.main_manager.repository.dao;

import cn.hengzhu.main_manager.repository.domain.AccessRecord;
import cn.hengzhu.main_manager.repository.domain.AccessRecordExample;
import cn.hengzhu.main_manager.repository.param.BoxUseRecordParam;
import cn.hengzhu.main_manager.repository.param.CompBillParam;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface AccessRecordMapper {
    /**
     *
     * @mbg.generated
     */
    long countByExample(AccessRecordExample example);

    /**
     *
     * @mbg.generated
     */
    int deleteByExample(AccessRecordExample example);

    /**
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     *
     * @mbg.generated
     */
    int insert(AccessRecord record);

    /**
     *
     * @mbg.generated
     */
    int insertSelective(AccessRecord record);

    /**
     *
     * @mbg.generated
     */
    List<AccessRecord> selectByExample(AccessRecordExample example);
    
    /**
    *
    * @mbg.generated
    */
   List<AccessRecord> selectByExampleSize(@Param("example") AccessRecordExample example,@Param("size")Integer size);

    /**
     *
     * @mbg.generated
     */
    AccessRecord selectByPrimaryKey(Integer id);

    /**
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") AccessRecord record, @Param("example") AccessRecordExample example);

    /**
     *
     * @mbg.generated
     */
    int updateByExample(@Param("record") AccessRecord record, @Param("example") AccessRecordExample example);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(AccessRecord record);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(AccessRecord record);
    
    List<AccessRecord> getRecordByBoxId(@Param("param") BoxUseRecordParam param);

	List<AccessRecord> getRecordListByOpenId(@Param("openId") String openId);

	List<AccessRecord> getCompBillListByBoxIds(@Param("param") CompBillParam param);

	int insertBatch(List<AccessRecord> list);

	/**
	 * @author liuCheng
	 * @since 2018年12月19日 上午11:31:40 
	 * @param accessRecord
	 * @param boxIdList
	 * 快递柜的批量清除的数据插入
	 */
	int insertBatchByExpress(@Param("record")AccessRecord accessRecord,@Param("boxIdList") List<Integer> boxIdList);
	
	
	
	

}